package com.liu.lsm.livestock.service.impl;

import com.liu.lsm.livestock.entity.Livestock;
import com.liu.lsm.livestock.mapper.LivestockMapper;
import com.liu.lsm.livestock.service.LivestockService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class LivestockServiceImpl implements LivestockService {

    @Resource
    LivestockMapper livestockMapper;


    @Override
    public void deleteById(Integer id) {
        livestockMapper.deleteById(id);
    }

    @Override
    public void insert(Livestock livestock) {
        livestockMapper.insert(livestock);
    }

    @Override
    public Livestock selectById(Integer id) {
        return livestockMapper.selectById(id);
    }

    @Override
    public void updateById(Livestock livestock) {
        livestockMapper.updateById(livestock);
    }

    @Override
    public List<Livestock> listAll(Livestock livestock) {
        return livestockMapper.listAll(livestock);
    }
}
